<template>
  <!--todo:论文检索结果，大概展示为文章列表-->
  <div style="width:100vw ;height: 100%; position:fixed; top: 0; overflow: hidden">
    <img :src="cover" alt="" style="width: 100vw; z-index: 0">
  </div>
  <navigator-menu></navigator-menu>
  <!--     检索内容 -->
  <el-card shadow="always"
           style="height:18vh; width:60vw; border-radius: 20px 20px; margin: 12vh 5vh 0 20vw; opacity: 0.98">
    <div style="margin-right:30px;">
      <h2 style="float:left; height: 18vh; margin-right:20px; margin-top:35px;">AEP智搜</h2>
      <div style="font-size: 15px">当前搜索：{{ searchCond }}</div>
      <el-input
          v-model="searchWord"
          placeholder="海量资源，等你发现"
          style="float:left; width: 40vw; margin-top:10px;"
          input-style="height: 8vh;border-radius: 1.5vw;"
          @keyup.enter="simpleSearch"
      />
      <router-link to="/advancedSearch">
        <el-button type="text" style="float:right; margin-right:75px;">>高级搜索</el-button>
      </router-link>
      <el-button type="text" style="float:right; margin-right:50px;" @click="addSearchCond">>添加搜索条件</el-button>
    </div>
  </el-card>

  <!-- 相关学者部分 -->
  <el-card shadow="always"
           style="float:left; border-radius: 35px 35px; width:60vw; margin: 1vw 20vw 0 20vw; opacity: 0.94">
    <!-- <h3>相关学者</h3> -->
    <!-- <el-divider></el-divider> -->
    <div v-for="(scholar, index) in relatedScholars" :key="index" style="float:left; margin:0 0 20px 10px;">
      <el-card v-if="index<7" style="height:150px; width:125px; border-radius: 35px 35px;">
        <router-link v-if="scholar.scholar" :to="{path:'/MyPage',query:{userId:scholar.scholar.userId,userIdIn:myId}}" style="text-decoration: none;">
          <el-avatar v-if="scholar.avatar" :size="60" :src="'http://124.70.186.113:39245'+scholar.avatar" style="margin-left:15px;"></el-avatar>
          <el-avatar v-else :size="60" :src="defaultAva[index+randomNum]" style="margin-left:15px;"></el-avatar>
          <div style="width:80px; text-align:center; font-size:8px; margin: 0 0 0 5px;">{{ scholar.scholar.name }}</div>
          <div style="margin:2px 0 0 10px; text-align:center;"><el-icon><mostly-cloudy /></el-icon><span style="font-size:5px;">{{ scholar.scholar.ncitation }}</span></div>
        </router-link>
        <div v-else style="text-decoration: none;">
          <el-avatar v-if="scholar.avatar" :size="60" :src="scholar.avatar" style="margin-left:15px;"></el-avatar>
          <el-avatar v-else :size="60" :src="defaultAva[index+randomNum]" style="margin-left:15px;"></el-avatar>
          <div style="width:80px; text-align:center; font-size:8px; margin: 0 0 0 5px;">{{ scholar.name }}</div>
          <div style="margin:2px 0 0 10px; text-align:center;"><el-icon><mostly-cloudy /></el-icon><span style="font-size:5px;">{{ scholar.n_citation }}</span></div>
        </div>
      </el-card>
    </div>
  </el-card>

  <!-- 检索结果列表部分 -->
  <el-card shadow="always"
           style="float:left; border-radius: 35px 35px; width:60vw; margin: 1vw 20vw 12vh 20vw; opacity: 0.94">
    <!--     检索内容 -->
    <template #header style="position: fixed;">
      <!--      <div style="margin-right:30px;">-->
      <!--        <h2 style="float:left;">AEP智搜</h2>-->
      <!--      <el-input-->
      <!--          v-model="searchWord"-->
      <!--          placeholder="海量资源，等你发现"-->
      <!--          style="float:left; height:10vh; width: 50vw; margin: 0 auto;"-->
      <!--          input-style="height: 8vh;border-radius: 1.5vw;"-->
      <!--          @keyup.enter="simpleSearch"-->
      <!--      />-->
      <!-- <span style="float: right">
      <router-link to="/advancedSearch">
        <el-button type="text" style="float:left; margin-left:5px;">高级搜索</el-button>
      </router-link>
      <el-button type="text" style="float:left; margin-left:5px;">历史搜索</el-button>
      </span> -->
      <!--      </div>-->
      <el-radio-group v-model="sortButton" size="medium">
        <el-radio-button label="排序：" disabled></el-radio-button>
        <el-radio-button label="1" @click="clickSortButton(1)">相关度
        </el-radio-button>
        <el-radio-button label="2" @click="clickSortButton(2)">出版时间<span v-if="inOrder2">↓</span><span v-else>↑</span>
        </el-radio-button>
        <el-radio-button label="3" @click="clickSortButton(3)">被引频次<span v-if="inOrder3">↓</span><span v-else>↑</span>
        </el-radio-button>
      </el-radio-group>
      <!-- 过滤条件 -->
      <el-card shadow="always"
               style="position: fixed; float:left; border-radius: 35px 35px; width:15vw; height: 70vh; top: 12vh; left: 3vw; opacity: 0.95;">
        <h3>精炼检索结果</h3>
        <el-divider></el-divider>
        <h4>快速过滤</h4>
        <el-checkbox-group v-model="quickFilter" style="margin:0 30px 10px 0">
          <el-checkbox label="热门论文" style="margin-top:10px;"><el-icon size="15" color="#F56C6C"><trophy /></el-icon> 热门论文</el-checkbox>
          <el-checkbox label="高被引论文" style="margin-top:10px;"><el-icon size="15" color="#E6A23C"><sunny /></el-icon> 高被引论文</el-checkbox>
          <el-checkbox label="开放获取" style="margin-top:10px;"><el-icon size="15" color="green"><takeaway-box /></el-icon> 开放获取</el-checkbox>
        </el-checkbox-group>
        <el-button @click="filterSearch">过滤</el-button>

        <el-divider></el-divider>
        <h4>领域过滤</h4>
        <el-cascader v-model="field_filter" :options="category_filter" placeholder="不限" clearable @change="filterField"
                     style="margin-top: 20px;"/>
        <!-- <h4>研究领域</h4>
        <el-checkbox-group v-model="areaFilter">
          <el-checkbox label="操作系统"/>
          <el-checkbox label="网络存储"/>
          <el-checkbox label="软件工程"/>
        </el-checkbox-group>

        <el-divider></el-divider>
        <h4>期刊/会议</h4>
        <el-checkbox-group v-model="journalFilter">
          <el-checkbox label="软件学报"/>
          <el-checkbox label="硬件学报"/>
          <el-checkbox label="废件学报"/>
        </el-checkbox-group> -->
      </el-card>
    </template>

    <!--    <el-card style="margin: 3vh auto">
          <el-radio-group v-model="sortButton" size="medium">
            <el-radio-button label="排序：" disabled></el-radio-button>
            <el-radio-button label="1" @click="clickSortButton(1)">相关度<span v-if="inOrder1">↓</span><span v-else>↑</span>
            </el-radio-button>
            <el-radio-button label="2" @click="clickSortButton(2)">出版时间<span v-if="inOrder2">↓</span><span v-else>↑</span>
            </el-radio-button>
            <el-radio-button label="3" @click="clickSortButton(3)">被引频次<span v-if="inOrder3">↓</span><span v-else>↑</span>
            </el-radio-button>
          </el-radio-group>
        </el-card>-->
    <div v-for="(paper, index) in Papers" :key="index">
      <el-card style="margin-bottom:3.25vh; border-radius:20px;" class="wow slideInUp"
               :data-wow-duration="2.25 + index/2.25 + 's'" data-wow-delay="0.05s">
        <h2>{{ 20 * (currentPage-1) + index + 1 }}.
          <el-button type="text" @click="showPaperDetail(paper.id)" style="width: 1vw; color:#000000; font-size: 25px; font-weight: 900; text-decoration: none;"><span v-html="paper.title.slice(0,80)"></span><span v-if="computeLength(paper.title)>60">...</span>
          </el-button>
        </h2>
        <h5>
          <!-- 学术成果类型 -->
          <span v-if="paper.doc_type=='book'" style="margin-right:10px; color: #b9b9b9">[会议记录]</span> <span v-else
                                                                                                            style="margin-right:10px;">[期刊论文]</span>
          <!-- 学术成果作者，最多展示3位 -->
          <span v-for="(author, index) in paper.authors" :key="index">
            <span v-if="index<3"
                         style="margin-right:8px; color:blue; text-decoration: none;">{{ author.name }}</span>
            </span>
            <span v-if="paper.authors.length>3" style="margin-right:8px;">等</span>
          <!-- 学术成果出版源 -->
          <span v-if="paper.venue"><span style="margin-right:10px;"> -{{ paper.venue.raw }}</span><span>{{
              paper.year
            }}年{{ paper.volume }}期{{ paper.issue }}卷</span></span>
        </h5>
        <!-- 摘要 -->
        <h5>摘要：<span v-if="paper.abstract.length>500" v-html="paper.abstract.slice(0,500)+'...'"></span> <span
            v-else v-html="paper.abstract"></span></h5>
        <!-- 领域 -->
        <span>领域：</span>
        <span v-for="(fieldItem, index) in paper.field" :key="index">
            <!-- <span v-if="index<=5" style="margin-right:20px; color:#04B431;">{{ printField(fieldItem) }}</span> -->
            <el-tag
              >{{ printField(fieldItem) }}</el-tag
            >
        </span>
        <span v-if="paper.field.length>5" style="margin-right:5px;">等</span>
        <!-- 关键词 -->
        <h5 v-if="paper.keywords">关键词：<span v-for="(keyword, index) in paper.keywords" :key="index" style="margin-right:20px;">{{
            keyword
          }}</span></h5>
        <!-- 浏览+引用次数 -->
        <h5><span style="margin-right:20px;">{{ paper.vis_count }}次浏览</span><span
            v-if="paper.n_citation">{{ paper.n_citation }}次引用</span></h5>
      </el-card>
    </div>
    <!-- 页码器 -->
    <div style="margin-top: 6vh;" class="wow slideInUp" data-wow-duration="1.85s" data-wow-delay="0.25s">
      <el-pagination
          v-model="currentPage"
          page-size="20"
          layout="prev, pager, next, jumper"
          :total="totalNum"
          @current-change="handleCurrentChange"
          style="text-align:center;"
      >
      </el-pagination>
    </div>
  </el-card>

   <el-card shadow="always"
           style=" position: fixed; border-radius: 15px 15px; width:16vw; height: 70vh; right: 1vw; top: 12vh;  opacity: 0.94;">
    <template #header>
      <div class="card-header">
        <span>领域热门</span>
<!--                        <el-button class="button" type="text" @click="" style="float: right">查看更多</el-button>-->
       </div>
    </template>
    <!--            <el-descriptions
                    :column="3"
                    border
                    style="width: 36vw;margin: 2vh auto;" v-for="(scholar, index) in scholars"
                >
                  {{index+1}}
                  <el-descriptions-item>
                    <template #label>
                      <el-icon>
                        <user/>
                      </el-icon>
                      姓名
                    </template>
                    {{ scholar.name }}
                  </el-descriptions-item>
                  <el-descriptions-item>
                    <template #label>
                      <el-icon>
                        <location/>
                      </el-icon>
                      机构
                    </template>
                    {{ scholar.affi }}
                  </el-descriptions-item>
                  <el-descriptions-item>
                    <template #label>
                      <el-icon>
                        <tickets/>
                      </el-icon>
                      领域
                    </template>
                    <el-tag size="small">{{ scholar.field }}</el-tag>
                  </el-descriptions-item>
                  <el-button type="primary" size="small">关注</el-button>
                </el-descriptions>-->
     <el-scrollbar height="65vh" style="">
      <div v-for="(hotField, index) in hotFields" style="margin: 0.2vw; margin-top: 2vh;">
                <span style="width: 90%;  font-weight: 850; margin-right: 2vw;text-overflow: ellipsis">{{ index + 1 }} {{
                    hotField.title.slice(0, 35) + '...'
                  }}</span>

        <el-tag style="margin-right: .5vw; " v-if="hotField.venue.raw.length>=10">{{ hotField.venue.raw.slice(0, 10)+ '...' }}</el-tag>
       <el-tag style="margin-right: .5vw; " v-else>{{ hotField.venue.raw }}</el-tag>
        <div style="margin-top: 1vh;">
          <span style="margin-right: .5vw; font-size: 10px"> <el-icon><user/></el-icon> {{
              hotField.authors[0].name
            }}</span>
          <span style="margin-right: .5vw;font-size: 10px"> <el-icon><histogram/></el-icon> {{
              hotField.vis_count
            }}</span>
          <el-button type="text" size="small" style="float: right; margin-bottom: 0.9vh"
                     @click="showPaperDetail(hotField.id)">
            了解更多
          </el-button>
        </div>
      </div>
    </el-scrollbar>
   </el-card>

  <!-- 回到顶部 -->
  <el-backtop :bottom="100">
    <!--    <div-->
    <!--        style="-->
    <!--        height: 100%;-->
    <!--        width: 100%;-->
    <!--        background-color: #f2f5f6;-->
    <!--        box-shadow: 0 0 6px rgba(0, 0, 0, 0.12);-->
    <!--        text-align: center;-->
    <!--        line-height: 40px;-->
    <!--        color: #1989fa;-->
    <!--      "-->
    <!--    >-->
    <!--      UP-->
    <!--    </div>-->
  </el-backtop>
</template>

<script>
import {ref} from '@vue/reactivity';
import axios from 'axios'
import router from "../router";
import NavigatorMenu from "../components/NavigatorMenu";

export default {
  name: "searchResult",
  components: {
    NavigatorMenu,
    axios,
  },
  data() {
    return {
      randomNum: 0,
      myId: '',
      searchWord: '',
      searchCond: '',
      clickTime: 0,
      sortButton: 1,
      inOrder1: true,
      inOrder2: true,
      inOrder3: true,
      currentPage: 1,
      condition: {},
      conditionStore: {},
      conditions: [],
      conditionsStore: [],
      quickFilter: [],
      quickFilterStore: [],
      areaFilter: [],
      journalFilter: [],
      cardDuration: '',
      cover: require('../assets/images/apple.jpg'),
      Papers: [],
      totalNum: 0,
      relatedScholars: [],
      hotFields: [],
      category_map: [
        {
          label: '医学',
          key: 'medical'
        },
        {
          label: '信息学',
          key: 'info'
        },
        {
          label: '经济学',
          key: 'eco'
        },
        {
          label: '天体物理学',
          key: 'astro-ph'
        },
        {
          label: '宇宙学与非星系天体物理学',
          key: 'astro-ph.CO'
        },
        {
          label: '地球与行星天体物理学',
          key: 'astro-ph.EP'
        },
        {
          label: '星系天体物理学',
          key: 'astro-ph.GA'
        },
        {
          label: '高能天体物理现象学',
          key: 'astro-ph.HE'
        },
        {
          label: '天体物理学的仪器和方法',
          key: 'astro-ph.IM'
        },
        {
          label: '太阳和恒星天体物理学',
          key: 'astro-ph.SR'
        },
        {
          label: '无序系统与神经网络',
          key: 'cond-mat.dis-nn'
        },
        {
          label: '中尺度和纳米级物理',
          key: 'cond-mat.mes-hall'
        },
        {
          label: '材料科学',
          key: 'cond-mat.mtrl-sci'
        },
        {
          label: '其他凝聚态物质',
          key: 'cond-mat.other'
        },
        {
          label: '量子气体',
          key: 'cond-mat.quant-gas'
        },
        {
          label: '软凝聚态物质',
          key: 'cond-mat.soft'
        },
        {
          label: '统计力学',
          key: 'cond-mat.stat-mech'
        },
        {
          label: '电子波函数',
          key: 'cond-mat.str-el'
        },
        {
          label: '超导电性',
          key: 'cond-mat.supr-con'
        },
        {
          label: '人工智能',
          key: 'cs.AI'
        },
        {
          label: '硬件架构',
          key: 'cs.AR'
        },
        {
          label: '计算复杂性',
          key: 'cs.CC'
        },
        {
          label: '计算工程、金融和科学',
          key: 'cs.CE'
        },
        {
          label: '计算几何',
          key: 'cs.CG'
        },
        {
          label: '计算和语言',
          key: 'cs.CL'
        },
        {
          label: '加密与安全',
          key: 'cs.CR'
        },
        {
          label: '计算机视觉和模式识别',
          key: 'cs.CV'
        },
        {
          label: '计算机与社会',
          key: 'cs.CY'
        },
        {
          label: '数据库',
          key: 'cs.DB'
        },
        {
          label: '分布式、并行和集群计算',
          key: 'cs.DC'
        },
        {
          label: '数字图书馆',
          key: 'cs.DL'
        },
        {
          label: '离散数学',
          key: 'cs.DM'
        },
        {
          label: '数据结构和算法',
          key: 'cs.DS'
        },
        {
          label: '新兴技术',
          key: 'cs.ET'
        },
        {
          label: '形式语言与自动机理论',
          key: 'cs.FL'
        },
        {
          label: '一般文献',
          key: 'cs.GL'
        },
        {
          label: '制图学',
          key: 'cs.GR'
        },
        {
          label: '计算机科学与博弈论',
          key: 'cs.GT'
        },
        {
          label: '人机交互',
          key: 'cs.HC'
        },
        {
          label: '信息检索',
          key: 'cs.IR'
        },
        {
          label: '信息论',
          key: 'cs.IT'
        },
        {
          label: '机器学习',
          key: 'cs.LG'
        },
        {
          label: '计算机科学中的逻辑',
          key: 'cs.LO'
        },
        {
          label: '多智能体系统 ',
          key: 'cs.MA'
        },
        {
          label: '多媒体',
          key: 'cs.MM'
        },
        {
          label: '数学软件',
          key: 'cs.MS'
        },
        {
          label: '数值分析',
          key: 'cs.NA'
        },
        {
          label: '神经与进化计算',
          key: 'cs.NE'
        },
        {
          label: '网络与互联网架构',
          key: 'cs.NI'
        },
        {
          label: '其他计算机科学',
          key: 'cs.OH'
        },
        {
          label: '操作系统',
          key: 'cs.OS'
        },
        {
          label: '性能',
          key: 'cs.PF'
        },
        {
          label: '编程语言',
          key: 'cs.PL'
        },
        {
          label: '机器人学',
          key: 'cs.RO'
        },
        {
          label: '符号计算',
          key: 'cs.SC'
        },
        {
          label: '响应',
          key: 'cs.SD'
        },
        {
          label: '软件工程',
          key: 'cs.SE'
        },
        {
          label: '社会与信息网络',
          key: 'cs.SI'
        },
        {
          label: '系统控制',
          key: 'cs.SY'
        },
        {
          label: '经济计量学',
          key: 'econ.EM'
        },
        {
          label: '语音与音频处理',
          key: 'eess.AS'
        },
        {
          label: '图像与视频处理',
          key: 'eess.IV'
        },
        {
          label: '信号处理',
          key: 'eess.SP'
        },
        {
          label: '广义相对论和量子宇宙学',
          key: 'gr-qc'
        },
        {
          label: '高能物理-实验',
          key: 'hep-ex'
        },
        {
          label: '高能物理-晶格',
          key: 'hep-lat'
        },
        {
          label: '高能物理-现象学',
          key: 'hep-ph'
        },
        {
          label: '高能物理-理论',
          key: 'hep-th'
        },
        {
          label: '交换代数',
          key: 'math.AC'
        },
        {
          label: '代数几何',
          key: 'math.AG'
        },
        {
          label: '项目态势评估分析',
          key: 'math.AP'
        },
        {
          label: '代数拓扑',
          key: 'math.AT'
        },
        {
          label: '经典分析与常微分方程',
          key: 'math.CA'
        },
        {
          label: '组合学',
          key: 'math.CO'
        },
        {
          label: '电子理论',
          key: 'math.CT'
        },
        {
          label: '复杂变量',
          key: 'math.CV'
        },
        {
          label: '微分几何',
          key: 'math.DG'
        },
        {
          label: '动态系统',
          key: 'math.DS'
        },
        {
          label: '泛函分析',
          key: 'math.FA'
        },
        {
          label: '普通数学',
          key: 'math.GM'
        },
        {
          label: '一般拓扑学',
          key: 'math.GN'
        },
        {
          label: '群论',
          key: 'math.GR'
        },
        {
          label: '几何拓扑学',
          key: 'math.GT'
        },
        {
          label: '历史和概述',
          key: 'math.HO'
        },
        {
          label: '信息论',
          key: 'math.IT'
        },
        {
          label: 'K理论与同源性',
          key: 'math.KT'
        },
        {
          label: 'K理论与同源性',
          key: 'math.KT'
        },
        {
          label: '逻辑学',
          key: 'math.LO'
        },
        {
          label: '几何度量学',
          key: 'math.MG'
        },
        {
          label: '数学物理',
          key: 'math.MP'
        },
        {
          label: '数值分析',
          key: 'math.NA'
        },
        {
          label: '数论',
          key: 'math.NT'
        },
        {
          label: '运算符代数',
          key: 'math.OA'
        },
        {
          label: '最优化及控制',
          key: 'math.OC'
        },
        {
          label: '概率',
          key: 'math.PR'
        },
        {
          label: '量子代数',
          key: 'math.QA'
        },
        {
          label: '环与代数',
          key: 'math.RA'
        },
        {
          label: '表示论',
          key: 'math.RT'
        },
        {
          label: '辛几何',
          key: 'math.SG'
        },
        {
          label: '光谱理论',
          key: 'math.SP'
        },
        {
          label: '统计理论',
          key: 'math.ST'
        },
        {
          label: '数学物理',
          key: 'math-ph'
        },
        {
          label: '适应和自组织系统',
          key: 'nlin.AO'
        },
        {
          label: '混沌动力学',
          key: 'nlin.CD'
        },
        {
          label: '细胞自动机和晶格气体',
          key: 'nlin.CG'
        },
        {
          label: '模式形成与孤子',
          key: 'nlin.PS'
        },
        {
          label: '完全可解和可积的系统',
          key: 'nlin.SI'
        },
        {
          label: '核实验',
          key: 'nucl-ex'
        },
        {
          label: '核理论',
          key: 'nucl-th'
        },
        {
          label: '加速器物理',
          key: 'physics.acc-ph'
        },
        {
          label: '大气和海洋物理学',
          key: 'physics.ao-ph'
        },
        {
          label: '应用物理学',
          key: 'physics.app-ph'
        },
        {
          label: '原子簇和分子簇',
          key: 'physics.atm-clus'
        },
        {
          label: '原子物理学',
          key: 'physics.atom-ph'
        },
        {
          label: '生物物理学',
          key: 'physics.bio-ph'
        },
        {
          label: '化学物理学',
          key: 'physics.chem-ph'
        },
        {
          label: '经典物理学',
          key: 'physics.class-ph'
        },
        {
          label: '计算物理学',
          key: 'physics.comp-ph'
        },
        {
          label: '数据分析、统计与概率',
          key: 'physics.data-an'
        },
        {
          label: '物理教育',
          key: 'physics.ed-ph'
        },
        {
          label: '流体力学',
          key: 'physics.flu-dyn'
        },
        {
          label: '普通物理',
          key: 'physics.gen-ph'
        },
        {
          label: '地球物理学',
          key: 'physics.geo-ph'
        },
        {
          label: '物理学史和哲学',
          key: 'physics.hist-ph'
        },
        {
          label: '仪器仪表和探测器',
          key: 'physics.ins-det'
        },
        {
          label: '医学物理',
          key: 'physics.med-ph'
        },
        {
          label: '光学',
          key: 'physics.optics'
        },
        {
          label: '等离子物理',
          key: 'physics.plasm-ph'
        },
        {
          label: '热门物理',
          key: 'physics.pop-ph'
        },
        {
          label: '物理学与社会',
          key: 'physics.soc-ph'
        },
        {
          label: '空间物理',
          key: 'physics.space-ph'
        },
        {
          label: '生物分子',
          key: 'q-bio.BM'
        },
        {
          label: '细胞行为',
          key: 'q-bio.CB'
        },
        {
          label: '基因组学',
          key: 'q-bio.GN'
        },
        {
          label: '分子网络',
          key: 'q-bio.MN'
        },
        {
          label: '神经元和认知',
          key: 'q-bio.NC'
        },
        {
          label: '其他定量生物学',
          key: 'q-bio.OT'
        },
        {
          label: '种群与进化',
          key: 'q-bio.PE'
        },
        {
          label: '定量方法',
          key: 'q-bio.QM'
        },
        {
          label: '亚细胞过程',
          key: 'q-bio.SC'
        },
        {
          label: '组织和器官',
          key: 'q-bio.TO'
        },
        {
          label: '计算金融学',
          key: 'q-fin.CP'
        },
        {
          label: '经济学',
          key: 'q-fin.EC'
        },
        {
          label: '一般金融',
          key: 'q-fin.GN'
        },
        {
          label: '数理金融学',
          key: 'q-fin.MF'
        },
        {
          label: '投资组合管理',
          key: 'q-fin.PM'
        },
        {
          label: '证券定价',
          key: 'q-fin.PR'
        },
        {
          label: '风险管理',
          key: 'q-fin.RM'
        },
        {
          label: '统计金融',
          key: 'q-fin.ST'
        },
        {
          label: '交易和市场微观结构',
          key: 'q-fin.TR'
        },
        {
          label: '量子物理',
          key: 'quant-ph'
        },
        {
          label: '应用软件',
          key: 'stat.AP'
        },
        {
          label: '计算',
          key: 'stat.CO'
        },
        {
          label: '方法论',
          key: 'stat.ME'
        },
        {
          label: '机器学习',
          key: 'stat.ML'
        },
        {
          label: '计算',
          key: 'stat.CO'
        },
        {
          label: '方法论',
          key: 'stat.ME'
        },
        {
          label: '机器学习',
          key: 'stat.ML'
        },
        {
          label: '其他统计数据',
          key: 'stat.OT'
        },
        {
          label: '统计理论',
          key: 'stat.TH'
        },
      ],
      category_filter: [
        {
          label: '天体物理学',
          value: 'astro-ph',
          children: [
            {
              label: '宇宙学与非星系天体物理学',
              value: 'astro-ph.CO'
            },
            {
              label: '地球与行星天体物理学',
              value: 'astro-ph.EP'
            },
            {
              label: '星系天体物理学',
              value: 'astro-ph.GA'
            },
            {
              label: '高能天体物理现象学',
              value: 'astro-ph.HE'
            },
            {
              label: '天体物理学的仪器和方法',
              value: 'astro-ph.IM'
            },
            {
              label: '太阳和恒星天体物理学',
              value: 'astro-ph.SR'
            },
          ],
        },
        {
          label: '凝聚态物理',
          value: 'cond-mat',
          children: [
            {
              label: '无序系统与神经网络',
              value: 'cond-mat.dis-nn'
            },
            {
              label: '中尺度和纳米级物理',
              value: 'cond-mat.mes-hall'
            },
            {
              label: '材料科学',
              value: 'cond-mat.mtrl-sci'
            },
            {
              label: '其他凝聚态物质',
              value: 'cond-mat.other'
            },
            {
              label: '量子气体',
              value: 'cond-mat.quant-gas'
            },
            {
              label: '软凝聚态物质',
              value: 'cond-mat.soft'
            },
            {
              label: '统计力学',
              value: 'cond-mat.stat-mech'
            },
            {
              label: '电子波函数',
              value: 'cond-mat.str-el'
            },
            {
              label: '超导电性',
              value: 'cond-mat.supr-con'
            },
          ],
        },
        {
          label: '计算机科学',
          value: 'cs',
          children: [
            {
              label: '人工智能',
              value: 'cs.AI'
            },
            {
              label: '硬件架构',
              value: 'cs.AR'
            },
            {
              label: '计算复杂性',
              value: 'cs.CC'
            },
            {
              label: '计算工程、金融和科学',
              value: 'cs.CE'
            },
            {
              label: '计算几何',
              value: 'cs.CG'
            },
            {
              label: '计算和语言',
              value: 'cs.CL'
            },
            {
              label: '加密与安全',
              value: 'cs.CR'
            },
            {
              label: '计算机视觉和模式识别',
              value: 'cs.CV'
            },
            {
              label: '计算机与社会',
              value: 'cs.CY'
            },
            {
              label: '数据库',
              value: 'cs.DB'
            },
            {
              label: '分布式、并行和集群计算',
              value: 'cs.DC'
            },
            {
              label: '数字图书馆',
              value: 'cs.DL'
            },
            {
              label: '离散数学',
              value: 'cs.DM'
            },
            {
              label: '数据结构和算法',
              value: 'cs.DS'
            },
            {
              label: '新兴技术',
              value: 'cs.ET'
            },
            {
              label: '形式语言与自动机理论',
              value: 'cs.FL'
            },
            {
              label: '一般文献',
              value: 'cs.GL'
            },
            {
              label: '制图学',
              value: 'cs.GR'
            },
            {
              label: '计算机科学与博弈论',
              value: 'cs.GT'
            },
            {
              label: '人机交互',
              value: 'cs.HC'
            },
            {
              label: '信息检索',
              value: 'cs.IR'
            },
            {
              label: '信息论',
              value: 'cs.IT'
            },
            {
              label: '机器学习',
              value: 'cs.LG'
            },
            {
              label: '计算机科学中的逻辑',
              value: 'cs.LO'
            },
            {
              label: '多智能体系统 ',
              value: 'cs.MA'
            },
            {
              label: '多媒体',
              value: 'cs.MM'
            },
            {
              label: '数学软件',
              value: 'cs.MS'
            },
            {
              label: '数值分析',
              value: 'cs.NA'
            },
            {
              label: '神经与进化计算',
              value: 'cs.NE'
            },
            {
              label: '网络与互联网架构',
              value: 'cs.NI'
            },
            {
              label: '其他计算机科学',
              value: 'cs.OH'
            },
            {
              label: '操作系统',
              value: 'cs.OS'
            },
            {
              label: '性能',
              value: 'cs.PF'
            },
            {
              label: '编程语言',
              value: 'cs.PL'
            },
            {
              label: '机器人学',
              value: 'cs.RO'
            },
            {
              label: '符号计算',
              value: 'cs.SC'
            },
            {
              label: '响应',
              value: 'cs.SD'
            },
            {
              label: '软件工程',
              value: 'cs.SE'
            },
            {
              label: '社会与信息网络',
              value: 'cs.SI'
            },
            {
              label: '系统控制',
              value: 'cs.SY'
            },
          ],
        },
        {
          label: '经济学',
          value: 'econ',
          children: [
            {
              label: '经济计量学',
              value: 'econ.EM'
            },
          ],
        },
        {
          label: '传播学',
          value: 'eess',
          children: [
            {
              label: '语音与音频处理',
              value: 'eess.AS'
            },
            {
              label: '图像与视频处理',
              value: 'eess.IV'
            },
            {
              label: '信号处理',
              value: 'eess.SP'
            },
          ],
        },
        {
          label: '量子力学',
          value: 'gr',
          children: [
            {
              label: '广义相对论和量子宇宙学',
              value: 'gr-qc'
            },
          ],
        },
        {
          label: '高能物理',
          value: 'hep',
          children: [
            {
              label: '高能物理-实验',
              value: 'hep-ex'
            },
            {
              label: '高能物理-晶格',
              value: 'hep-lat'
            },
            {
              label: '高能物理-现象学',
              value: 'hep-ph'
            },
            {
              label: '高能物理-理论',
              value: 'hep-th'
            },
          ],
        },
        {
          label: '数学',
          value: 'math',
          children: [
            {
              label: '交换代数',
              value: 'math.AC'
            },
            {
              label: '代数几何',
              value: 'math.AG'
            },
            {
              label: '项目态势评估分析',
              value: 'math.AP'
            },
            {
              label: '代数拓扑',
              value: 'math.AT'
            },
            {
              label: '经典分析与常微分方程',
              value: 'math.CA'
            },
            {
              label: '组合学',
              value: 'math.CO'
            },
            {
              label: '电子理论',
              value: 'math.CT'
            },
            {
              label: '复杂变量',
              value: 'math.CV'
            },
            {
              label: '微分几何',
              value: 'math.DG'
            },
            {
              label: '动态系统',
              value: 'math.DS'
            },
            {
              label: '泛函分析',
              value: 'math.FA'
            },
            {
              label: '普通数学',
              value: 'math.GM'
            },
            {
              label: '一般拓扑学',
              value: 'math.GN'
            },
            {
              label: '群论',
              value: 'math.GR'
            },
            {
              label: '几何拓扑学',
              value: 'math.GT'
            },
            {
              label: '历史和概述',
              value: 'math.HO'
            },
            {
              label: '信息论',
              value: 'math.IT'
            },
            {
              label: 'K理论与同源性',
              value: 'math.KT'
            },
            {
              label: 'K理论与同源性',
              value: 'math.KT'
            },
            {
              label: '逻辑学',
              value: 'math.LO'
            },
            {
              label: '几何度量学',
              value: 'math.MG'
            },
            {
              label: '数学物理',
              value: 'math.MP'
            },
            {
              label: '数值分析',
              value: 'math.NA'
            },
            {
              label: '数论',
              value: 'math.NT'
            },
            {
              label: '运算符代数',
              value: 'math.OA'
            },
            {
              label: '最优化及控制',
              value: 'math.OC'
            },
            {
              label: '概率',
              value: 'math.PR'
            },
            {
              label: '量子代数',
              value: 'math.QA'
            },
            {
              label: '环与代数',
              value: 'math.RA'
            },
            {
              label: '表示论',
              value: 'math.RT'
            },
            {
              label: '辛几何',
              value: 'math.SG'
            },
            {
              label: '光谱理论',
              value: 'math.SP'
            },
            {
              label: '统计理论',
              value: 'math.ST'
            },
            {
              label: '数学物理',
              value: 'math-ph'
            },
          ],
        },
        {
          label: '非线性科学',
          value: 'nlin',
          children: [
            {
              label: '适应和自组织系统',
              value: 'nlin.AO'
            },
            {
              label: '混沌动力学',
              value: 'nlin.CD'
            },
            {
              label: '细胞自动机和晶格气体',
              value: 'nlin.CG'
            },
            {
              label: '模式形成与孤子',
              value: 'nlin.PS'
            },
            {
              label: '完全可解和可积的系统',
              value: 'nlin.SI'
            },
          ],
        },
        {
          label: '核实验',
          value: 'nucl-ex',
        },
        {
          label: '核理论',
          value: 'nucl-th',
        },
        {
          label: '物理学',
          value: 'physics',
          children: [
            {
              label: '加速器物理',
              value: 'physics.acc-ph'
            },
            {
              label: '大气和海洋物理学',
              value: 'physics.ao-ph'
            },
            {
              label: '应用物理学',
              value: 'physics.app-ph'
            },
            {
              label: '原子簇和分子簇',
              value: 'physics.atm-clus'
            },
            {
              label: '原子物理学',
              value: 'physics.atom-ph'
            },
            {
              label: '生物物理学',
              value: 'physics.bio-ph'
            },
            {
              label: '化学物理学',
              value: 'physics.chem-ph'
            },
            {
              label: '经典物理学',
              value: 'physics.class-ph'
            },
            {
              label: '计算物理学',
              value: 'physics.comp-ph'
            },
            {
              label: '数据分析、统计与概率',
              value: 'physics.data-an'
            },
            {
              label: '物理教育',
              value: 'physics.ed-ph'
            },
            {
              label: '流体力学',
              value: 'physics.flu-dyn'
            },
            {
              label: '普通物理',
              value: 'physics.gen-ph'
            },
            {
              label: '地球物理学',
              value: 'physics.geo-ph'
            },
            {
              label: '物理学史和哲学',
              value: 'physics.hist-ph'
            },
            {
              label: '仪器仪表和探测器',
              value: 'physics.ins-det'
            },
            {
              label: '医学物理',
              value: 'physics.med-ph'
            },
            {
              label: '光学',
              value: 'physics.optics'
            },
            {
              label: '等离子物理',
              value: 'physics.plasm-ph'
            },
            {
              label: '热门物理',
              value: 'physics.pop-ph'
            },
            {
              label: '物理学与社会',
              value: 'physics.soc-ph'
            },
            {
              label: '空间物理',
              value: 'physics.space-ph'
            },
          ],
        },
        {
          label: '定量生物学',
          value: 'q-bio',
          children: [
            {
              label: '生物分子',
              value: 'q-bio.BM'
            },
            {
              label: '细胞行为',
              value: 'q-bio.CB'
            },
            {
              label: '基因组学',
              value: 'q-bio.GN'
            },
            {
              label: '分子网络',
              value: 'q-bio.MN'
            },
            {
              label: '神经元和认知',
              value: 'q-bio.NC'
            },
            {
              label: '其他定量生物学',
              value: 'q-bio.OT'
            },
            {
              label: '种群与进化',
              value: 'q-bio.PE'
            },
            {
              label: '定量方法',
              value: 'q-bio.QM'
            },
            {
              label: '亚细胞过程',
              value: 'q-bio.SC'
            },
            {
              label: '组织和器官',
              value: 'q-bio.TO'
            },
          ],
        },
        {
          label: '定量金融学',
          value: 'q-fin',
          children: [
            {
              label: '计算金融学',
              value: 'q-fin.CP'
            },
            {
              label: '经济学',
              value: 'q-fin.EC'
            },
            {
              label: '一般金融',
              value: 'q-fin.GN'
            },
            {
              label: '数理金融学',
              value: 'q-fin.MF'
            },
            {
              label: '投资组合管理',
              value: 'q-fin.PM'
            },
            {
              label: '证券定价',
              value: 'q-fin.PR'
            },
            {
              label: '风险管理',
              value: 'q-fin.RM'
            },
            {
              label: '统计金融',
              value: 'q-fin.ST'
            },
            {
              label: '交易和市场微观结构',
              value: 'q-fin.TR'
            },
          ],
        },
        {
          label: '量子物理',
          value: 'quant-ph',
        },
        {
          label: '统计学',
          value: 'stat',
          children: [
            {
              label: '应用软件',
              value: 'stat.AP'
            },
            {
              label: '计算',
              value: 'stat.CO'
            },
            {
              label: '方法论',
              value: 'stat.ME'
            },
            {
              label: '机器学习',
              value: 'stat.ML'
            },
            {
              label: '计算',
              value: 'stat.CO'
            },
            {
              label: '方法论',
              value: 'stat.ME'
            },
            {
              label: '机器学习',
              value: 'stat.ML'
            },
            {
              label: '其他统计数据',
              value: 'stat.OT'
            },
            {
              label: '统计理论',
              value: 'stat.TH'
            },
          ],
        },
        {
          label: '医学',
          value: 'medical'
        },
        {
          label: '信息学',
          value: 'info'
        },
        {
          label: '经济学',
          value: 'eco'
        },
      ],
      field_filter: '',
      field_filterStore: '',
      leftYear: 1950,
      rightYear: 2021,
      // defaultAva: require('../assets/images/defaultAvatar.png'),
      defaultAva: [
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.261361702b3dd3a47159d345da6b93d8?rik=ksXobpsQfUyO8w&riu=http%3a%2f%2fwww.dnzhuti.com%2fuploads%2fallimg%2f170410%2f95-1F410145Q4.jpg&ehk=glatNSMSZadEo7xXSHJzgij8HeyuUM2AR7nYswQT4e8%3d&risl=&pid=ImgRaw&r=0',
        // 'https://gss0.baidu.com/-Po3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D600%2C800/sign=e93da5a8b212c8fcb4a6fecbcc33be7d/4ec2d5628535e5dd7ca772577dc6a7efcf1b62ab.jpg',
        // 'https://pic1.zhimg.com/e3f7e68083caabf431befb316447de4d_r.jpg?source=1940ef5c',
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.0bf34d3bccaff4f64c8458c22f6b3b4e?rik=03AIc%2fmggwsMaw&riu=http%3a%2f%2fwww.1xyp.com%2fuploads%2fallimg%2f201017%2f2-20101G605230-L.jpg&ehk=mLh8ECviIu8i3K8u9xJ8IHPTcgG9o9vIDmlhgg2ebvs%3d&risl=&pid=ImgRaw&r=0',
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.c7657d74650abc5d8a6b18750faf8cab?rik=iv9XVAXzjsWrfg&riu=http%3a%2f%2fwww.dnzhuti.com%2fuploads%2fallimg%2f170410%2f95-1F410145Q8.jpg&ehk=oEKHB8296a7Q7l9aJ11cZitcaMwxtlyBjPhEj7GCet0%3d&risl=&pid=ImgRaw&r=0',
        // 'https://pic4.zhimg.com/v2-34e792921f7b22372e6714954091ec4f_r.jpg?source=1940ef5c',
        // 'https://tse2-mm.cn.bing.net/th/id/OIP-C.V49cr_28ZeC1PofdgpTugwAAAA?pid=ImgDet&rs=1',
        // 'https://tse2-mm.cn.bing.net/th/id/OIP-C._9lmx0NILC5DBXBuiKzvDAAAAA?pid=ImgDet&rs=1',
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.d6ea7b8f8a93445de2ec6a2eb8881f47?rik=U8l2k%2fo0lxpL5g&riu=http%3a%2f%2fi2.hdslb.com%2fbfs%2farchive%2faba5a0f3431c006b2c1c674f602f9ebcbc141fe8.jpg&ehk=NgU8S298l524vvi5Sfa8y0wGVdNYfUUqeqJPk%2fuC8q0%3d&risl=&pid=ImgRaw&r=0',
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.4f5c6a518a3b93f97d11626052d8bce3?rik=e3hLS7lPKGPwBQ&riu=http%3a%2f%2fimg.crcz.com%2fallimg%2f201810%2f03%2f1538569926240977.jpg&ehk=JIZ2sStcv658Y7HqqP7%2bXPQUy95dWTRWm9xoFHT3mDY%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1',
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.8ec8332751aa32a1f0f92f6e713438eb?rik=KVG4TbaynMzeLQ&riu=http%3a%2f%2ftao.goulew.com%2fusers%2fupfile%2f20190310%2f17235c62-cbd0-4a0b-8552-cbdba797d8fe.png&ehk=XL475H3JyTk16b2wNaciaEF52taWDSoXm1jqiJrsYF4%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1',
        // 'https://img.zcool.cn/community/01e97a5e731c99a80120a89560b97e.jpg@1280w_1l_2o_100sh.jpg',
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.49fad99463810dab2977fe464cee19ec?rik=mSzhDuZjtLJDWA&riu=http%3a%2f%2f10331995.s21i.faiusr.com%2f2%2fABUIABACGAAg_4uE-gUoj9_BMjCgBjigBg.jpg&ehk=pnfG71rQpU3Cnr5fAsQ%2bQkl0%2bAI6WW%2fslMF4g7aoyuo%3d&risl=&pid=ImgRaw&r=0',
        // 'https://www.zhifure.com/upload/images/2017/11/9143850328.jpg',
        // 'https://gss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/f7246b600c338744d44b136d530fd9f9d72aa010.jpg',
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.807ee8cef2671eb74332e1ec66a16ee4?rik=GOYIdK0hCaxekQ&riu=http%3a%2f%2fp0.so.qhimgs1.com%2ft01f2671eb74332e1ec.jpg&ehk=p5uUD9uni%2b0uE2R9CZEZMsHYDOeVv7wxK6AMfO%2bK6Kw%3d&risl=&pid=ImgRaw&r=0',
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.a31d65264e939bb2034fbd40d712233a?rik=aQc3Q0ovUPJBuQ&riu=http%3a%2f%2fwww.goupuzi.com%2fnewatt%2fMon_1906%2f1_179959_c8eca73aba62a54.jpg&ehk=akNAGLc7Nhv0B6ZknoNoDQqD13p3bLU4kStnM%2bPs3Po%3d&risl=&pid=ImgRaw&r=0',
        // 'https://tse1-mm.cn.bing.net/th/id/R-C.1076c006368e7e89231fc22c78618699?rik=PodflwPVh8oPpg&riu=http%3a%2f%2fup.keaitupian.com%2fuploads%2fimgs%2f2019%2f06%2fuKR_1560071261.jpg&ehk=3wZdIcqXTr%2fc%2bs1z0%2foS4KewAjhzVk1sYmlMriKZYeI%3d&risl=&pid=ImgRaw&r=0',
        // 'https://up.enterdesk.com/edpic/8b/25/b8/8b25b85f08fad4b824d514c1479afd6c.jpg',
        // 'https://img.zcool.cn/community/01bc1c5cee2ac4a80121a47047af74.jpg@1280w_1l_2o_100sh.jpg',
        'https://tse1-mm.cn.bing.net/th/id/R-C.9910484f6d5e5238879e17e4d33bffc3?rik=Ci92AbVcGMQYzA&riu=http%3a%2f%2fp4.itc.cn%2fq_70%2fimages03%2f20201101%2fad2ca77bf2e34d8fae1ebf6184407c16.jpeg&ehk=61mU3lfJQ0m3uOb8SYxEl9no4io1Yo3LIgRlWhbz6Pc%3d&risl=&pid=ImgRaw&r=0',
        'https://tse1-mm.cn.bing.net/th/id/R-C.6528df8069765ac9cbce14c7b06961cb?rik=RMrxErgdRrrMrQ&riu=http%3a%2f%2f5b0988e595225.cdn.sohucs.com%2fimages%2f20190314%2f987f176415c24ad2bb520f205b3f6e29.jpeg&ehk=v8qVH51Ibdgr0sTzbWDLmcXh2H9oxqZGL0nWufONpbc%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1',
        'https://tse1-mm.cn.bing.net/th/id/R-C.d144b5db975c00317b4a9b2683e86241?rik=Aly%2bPQwF9%2fCQ4Q&riu=http%3a%2f%2fn1.itc.cn%2fimg8%2fwb%2frecom%2f2016%2f01%2f06%2f145206284798996195.JPEG&ehk=WCpMeSjKiZag4nlYdBR6O985mJrj5R0LRmkQAvAO%2buE%3d&risl=&pid=ImgRaw&r=0',
        'https://tse1-mm.cn.bing.net/th/id/R-C.15b43b753cd6c19fa3bfb963e80db7e2?rik=JLUF1z12qlALVw&riu=http%3a%2f%2fimg3.cache.netease.com%2fphoto%2f0025%2f2014-01-16%2f9INNOBT940250025.jpg&ehk=B28KYOKSY6LvXXnW5C28%2fg%2bXDNhgrrwOYyIyQBu45rI%3d&risl=&pid=ImgRaw&r=0',
        'https://tse1-mm.cn.bing.net/th/id/R-C.a502824e9cef2609a34c0acbef3b65e3?rik=OcmNWQ0D7TIG9Q&riu=http%3a%2f%2fcnews.chinadaily.com.cn%2fimg%2fattachement%2fjpg%2fsite1%2f20141209%2feca86bd73dea15f106f00a.jpg&ehk=Huk8mbl1sj6cUgn02ONpwsX3Z43aVFCwqXhoMw6%2fC6g%3d&risl=&pid=ImgRaw&r=0',
        'https://tse1-mm.cn.bing.net/th/id/R-C.32930c950c0fb95de9158815343d009c?rik=a%2fblAxBWV2li%2fA&riu=http%3a%2f%2fzjucce.cn%2fUploadFile%2f20163238568161.jpg&ehk=LR59b8XofX343fVzd7entCWEQPa9J0HtJ6WfK0dTqW4%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1',
        'https://tse1-mm.cn.bing.net/th/id/R-C.5afb6523730f40e7e90585afc49b9964?rik=PvExJzzsC%2fIGpg&riu=http%3a%2f%2fp3.itc.cn%2fq_70%2fimages03%2f20200709%2f4f4b52743e314beea30b3dee4c08dc35.png&ehk=D12PH9Du1V%2f3lwV6kY5CBrFxHwPkXT3XMey91ZzQd7M%3d&risl=&pid=ImgRaw&r=0',
        'https://inews.gtimg.com/newsapp_bt/0/12663289082/1000',
        'https://tse1-mm.cn.bing.net/th/id/R-C.c6fcaf0d2e64e4b487d517052898f4b1?rik=Ahb5Db7DoGk45g&riu=http%3a%2f%2f5b0988e595225.cdn.sohucs.com%2fimages%2f20190314%2f93c79ff8857740afa3684225f25a75e0.jpeg&ehk=9cKRa73ehkwT%2fQSdkwdgKpO8MY6gEZ8VzFNmD5Wv%2b30%3d&risl=&pid=ImgRaw&r=0',
        'https://petbyus.com/wp-content/uploads/2020/11/20201119_5fb5c31cd8b73.jpg',
        'https://tse3-mm.cn.bing.net/th/id/OIP-C.lFp-QUYlb9JBQiSt93koxgHaEN?pid=ImgDet&rs=1',
        'https://tse1-mm.cn.bing.net/th/id/R-C.ec9daa7e1538c0bc20b45e826d1f4db7?rik=xPPImkAPwwDrKg&riu=http%3a%2f%2fimg1.gtimg.com%2f16%2f1629%2f162999%2f16299912_980x1200_0.jpg&ehk=v1qr4Sw%2fwe8O5pxnN70uEGFA3HB1DHdtOPtNpfPJK0I%3d&risl=&pid=ImgRaw&r=0',
        'https://tse1-mm.cn.bing.net/th/id/R-C.09290158bc72d1668fb878509f4748f3?rik=Nw438kVRowdNDA&riu=http%3a%2f%2fwww.uux.cn%2fattachments%2f2019%2f05%2f1_201905281634431syIY.jpg&ehk=ZIebn7hW0qjijIRF%2fGOMIHwe5ep5pmviY8gIkbDzogM%3d&risl=&pid=ImgRaw&r=0',
        'https://img.ji-qi.com/3/2020/0106/2020010615133825.jpg',
        'https://inews.gtimg.com/newsapp_bt/0/12574971111/1000',
      ]
    }
  },
  created() {
    console.log('in field')
    console.log(sessionStorage.getItem('hotField'));
    this.myId = sessionStorage.getItem("id")
    this.randomNum = Math.floor(Math.random() * 8)
    axios({
      method: 'get',
      url: '/api/hotIndex/field',
      params: {
        field: sessionStorage.getItem('hotField')
      }
    }).then(response => {
      console.log(response)
      if (response.data.code == 200) {
        this.hotFields = response.data.data
        console.log('hotfields')

        console.log(this.hotFields)
      } else {
        console.log(response.msg)
        this.$message({
          message: '请检查网络情况',
          type: 'warning'
        })
      }
    })
    this.field_filterStore = ''
    this.field_filter = ''
    if (this.$route.params.fromAdvanced || this.$route.params.fromCategory) {
      const Parameters = JSON.parse(this.$route.params.Parameters)
      this.conditions = Parameters.conditions
      this.leftYear = Parameters.year.l
      this.rightYear = Parameters.year.r
      this.conditionsStore = this.conditions
      this.condition = ''
      this.conditionStore = ''
      this.searchCond = ''
      for (let i = 0; i < this.conditions.length; i++) {
        if (i > 0) {
          switch (this.conditions[i].option) {
            case 0:
              this.searchCond = this.searchCond + ' AND '
              break
            case 1:
              this.searchCond = this.searchCond + ' OR '
              break
            case 2:
              this.searchCond = this.searchCond + ' NOT '
              break
            default:
              break
          }
        }
        switch (this.conditions[i].key) {
          case 'authors.name':
          case 'authors.name.keyword':
            this.searchCond = this.searchCond + '(作者)' + this.conditions[i].value
            break
          case 'doi':
          case 'doi.keyword':
            this.searchCond = this.searchCond + '(DOI)' + this.conditions[i].value
            break
          case 'field':
          case 'field.keyword':
            this.searchCond = this.searchCond + '(领域)' + this.printField(this.conditions[i].value)
            break
          case 'title':
          case 'title.keyword':
            this.searchCond = this.searchCond + '(标题)' + this.conditions[i].value
            break
          case 'isbn':
          case 'isbn.keyword':
            this.searchCond = this.searchCond + '(ISBN)' + this.conditions[i].value
            break
          case 'keywords':
          case 'keywords.keyword':
            this.searchCond = this.searchCond + '(关键词)' + this.conditions[i].value
            break
          case 'authors.org':
          case 'authors.org.keyword':
            this.searchCond = this.searchCond + '(机构)' + this.conditions[i].value
            break
          case 'venue.raw':
          case 'venue.raw.keyword':
            this.searchCond = this.searchCond + '(期刊)' + this.conditions[i].value
            break
          default:
            break
        }
      }
      console.log('fromCatoryParameters')
      console.log(Parameters)
      axios({
        method: 'post',
        url: '/api/paper/multi-search/',
        data: Parameters
      }).then(response => {
        if (response.data.code == 200) {
          console.log('response.data')
          console.log(response.data)
          this.Papers = response.data.data.jsonArray
          this.relatedScholars = response.data.data.relaAuthor
          this.totalNum = response.data.data.total
          this.totalNum /= 2
          console.log('this.Papers')
          console.log(this.Papers)
        } else {
          console.log(response.msg)
          this.$message({
            message: '抱歉，没搜到符合的学术成果，请更换检索条件',
            type: 'warning'
          })
        }
      })
    } else if (this.$route.params.fromJournal) {
      const Parameters = JSON.parse(this.$route.params.Parameters)
      var journalName = this.$route.params.journalName
      this.condition = Parameters.condition
      this.conditionStore = this.condition
      this.conditions = []
      this.conditionsStore = ''
      this.searchCond = '(期刊)' + journalName
      axios({
        method: 'post',
        url: '/api/paper/simple-search/',
        data: Parameters
      }).then(response => {
        console.log('advanced success!')
        console.log(response)
        if (response.data.code == 200) {
          this.Papers = response.data.data.jsonArray
          this.relatedScholars = response.data.data.relaAuthor
          this.totalNum = response.data.data.total
          this.totalNum /= 2
          console.log('this.Papers')
          console.log(this.Papers)
        } else {
          console.log(response.msg)
          this.$message({
            message: '抱歉，没搜到符合的学术成果，请更换检索条件',
            type: 'warning'
          })
        }
      })
    } else {
      this.searchCond = this.$route.query.value
      console.log('this.searchCond')
      console.log(this.searchCond)
      const Parameters = {
        condition: {
          key: '',
          option: 0,
          page: 1,
          size: 20,
          value: this.searchCond,
        },
        paperFilter: {
          canGet: false,
          highSite: false,
          hot: false,
        },
        sort: 1,
        year: {
          l: 1950,
          r: 2021,
        }
      }
      this.condition = Parameters.condition
      this.conditionStore = this.condition
      this.conditions = []
      this.conditionsStore = ''
      this.searchCond = '(主题)' + this.searchCond
      console.log('Parameters')
      console.log(Parameters)
      axios({
        method: 'post',
        url: '/api/paper/search-theme/',
        data: Parameters
      }).then(response => {
        if (response.data.code == 200) {
          this.Papers = response.data.data.jsonArray
          this.relatedScholars = response.data.data.relaAuthor
          this.totalNum = response.data.data.total
          this.totalNum /= 2
          console.log('response.data.data')
          console.log(response.data.data)
        } else {
          console.log(response.msg)
          this.$message({
            message: '抱歉，无法访问',
            type: 'warning'
          })
        }
      })
    }

  },
  methods: {
    computeLength(str) {
      var num=0
      var flag=0
      for(let i=0; i<str.length; i++){
        if(str[i]=='<'){
          flag=1
        }
        if(flag==0){
          num++
        }
        if(str[i]=='>'){
          flag=0
        }
      }
      return num
    },
    simpleSearch() {
      const Parameters = {
        condition: {
          key: '',
          option: 0,
          page: 1,
          size: 20,
          value: this.searchWord,
        },
        sort: 1,
        year: {
          l: 1950,
          r: 2021,
        }
      }
      axios({
        method: 'post',
        url: '/api/paper/search-theme/',
        data: Parameters
      }).then(response => {
        if (response.data.code == 200) {
          this.Papers = response.data.data.jsonArray
          this.relatedScholars = response.data.data.relaAuthor
          this.totalNum = response.data.data.total
          this.totalNum /= 2
          this.condition = Parameters.condition
          this.conditionStore = Parameters.condition
          this.conditions = []
          this.conditionsStore = []
          this.searchCond = this.searchWord
          this.searchWord = ''
          this.quickFilter = []
          this.quickFilterStore = []
          this.sortButton = 1,
              this.inOrder1 = true
          this.inOrder2 = true
          this.inOrder3 = true
        } else {
          console.log(response.msg)
          this.quickFilter = this.quickFilterStore
          this.$message({
            message: '抱歉，没有符合条件的学术成果',
            type: 'warning'
          })
        }
      })
    },
    clickSortButton(flag) {
      if (this.clickTime == 1) {
        console.log('flag:' + flag)
        console.log('this.sortButton:' + this.sortButton)
        this.clickTime = 0;
        if (flag == 1 && this.sortButton == 1) {
          this.inOrder1 = !this.inOrder1;
        } else if (flag == 2 && this.sortButton == 2) {
          this.inOrder2 = !this.inOrder2;
        } else if (flag == 3 && this.sortButton == 3) {
          this.inOrder3 = !this.inOrder3;
        } else {
          this.inOrder1 = true;
          this.inOrder2 = true;
          this.inOrder3 = true;
        }
        var order = flag;
        if (!(this.inOrder1 && this.inOrder2 && this.inOrder3)) {
          order = -order;
        }
        var canGet = false
        var highSite = false
        var hot = false
        for (let i = 0; i < this.quickFilter.length; i++) {
          if (this.quickFilter[i] == '热门论文') {
            hot = true
          } else if (this.quickFilter[i] == '高被引论文') {
            highSite = true
          } else if (this.quickFilter[i] == '开放获取') {
            canGet = true
          }
        }
        if (this.condition) {
          const Parameters = {
            condition: {
              key: this.condition.key,
              option: this.condition.option,
              page: 1,
              size: 20,
              value: this.condition.value,
            },
            paperFilter: {
              canGet: canGet,
              highSite: highSite,
              hot: hot,
            },
            sort: order,
            year: {
              l: 1950,
              r: 2021,
            }
          }
          console.log('主题检索排序')
          console.log(Parameters)
          axios({
            method: 'post',
            url: '/api/paper/search-theme/',
            data: Parameters
          }).then(response => {
            if (response.data.code == 200) {
              this.Papers = response.data.data.jsonArray
              this.relatedScholars = response.data.data.relaAuthor
              this.totalNum = response.data.data.total
              this.totalNum /= 2
              console.log('this.Papers')
              console.log(this.Papers)
            } else {
              console.log(response.msg)
              this.$message({
                message: '抱歉，无法访问',
                type: 'warning'
              })
            }
          })
        }
        else if(this.conditions){
          const Parameters = {
            conditions: this.conditions,
            paperFilter: {
              canGet: false,
              highSite: false,
              hot: false,
            },
            sort: order,
            year: {
              l: 1950,
              r: 2021,
            }
          }
          console.log('主题检索排序')
          console.log(Parameters)
          axios({
            method: 'post',
            url: '/api/paper/multi-search/',
            data: Parameters
          }).then(response => {
            console.log('response.data')
            console.log(response.data)
            if (response.data.code == 200) {
              console.log('response.data')
              console.log(response.data)
              this.Papers = response.data.data.jsonArray
              this.relatedScholars = response.data.data.relaAuthor
              this.totalNum = response.data.data.total
              this.totalNum /= 2
              console.log('this.Papers')
              console.log(this.Papers)
            } else {
              console.log(response.msg)
              this.$message({
                message: '抱歉，没搜到符合的学术成果，请更换检索条件',
                type: 'warning'
              })
            }
          })
        }
      } else {
        this.clickTime = 1;
      }
    },
    handleCurrentChange(newPage) {
      console.log('newPage' + newPage)
      console.log('condition' + this.condition)
      this.currentPage = newPage
      if (this.condition) {
        const Parameters = {
          condition: {
            key: this.condition.key,
            option: this.condition.option,
            page: this.currentPage,
            size: 20,
            value: this.condition.value,
          },
          paperFilter: {
            canGet: false,
            highSite: false,
            hot: false,
          },
          sort: 1,
          year: {
            l: 1950,
            r: 2021,
          }
        }
        console.log('单条件页码跳转')
        console.log(Parameters)
        axios({
          method: 'post',
          url: '/api/paper/search-theme/',
          data: Parameters
        }).then(response => {
          if (response.data.code == 200) {
            this.Papers = response.data.data.jsonArray
            this.relatedScholars = response.data.data.relaAuthor
            this.totalNum = response.data.data.total
            this.totalNum /= 2
            console.log('this.Papers')
            console.log(this.Papers)
          } else {
            console.log(response.msg)
            this.$message({
              message: '抱歉，无法访问',
              type: 'warning'
            })
          }
        })
      } else if (this.conditions) {
        for (let i = 0; i < this.conditions.length; i++) {
          this.conditions[i].page = this.currentPage
        }
        const Parameters1 = {
          conditions: this.conditions,
          paperFilter: {
            canGet: false,
            highSite: false,
            hot: false,
          },
          sort: 1,
          year: {
            l: 1950,
            r: 2021,
          }
        }
        axios({
          method: 'post',
          url: '/api/paper/multi-search/',
          data: Parameters1
        }).then(response => {
          if (response.data.code == 200) {
            this.Papers = response.data.data.jsonArray
            this.relatedScholars = response.data.data.relaAuthor
            this.totalNum = response.data.data.total
            this.totalNum /= 2
            console.log('this.Papers')
            console.log(this.Papers)
          } else {
            console.log(response.msg)
            this.$message({
              message: '抱歉，无法访问',
              type: 'warning'
            })
          }
        })
      } else {
        this.$message({
          message: '此路不通！',
          type: 'error'
        })
      }
      document.body.scrollTop = 0;
      document.documentElement.scrollTop = 0;
    },
    printField(key) {
      for (let i = 0; i < this.category_map.length; i++) {
        if (key == this.category_map[i].key) {
          return this.category_map[i].label
        }
      }
      return '其他'
    },
    addSearchCond() {
      var conditions = []
      if (this.condition) {
        conditions.push(this.condition)
      } else if (this.conditions) {
        conditions = this.conditions
      }
      console.log(conditions)
      console.log('conditions')
      router.push(
          {
            path: '/advancedSearch',
            name: 'AdvancedSearch',
            params: {
              fromSearchResult: true,
              conditions: JSON.stringify(conditions)
            }
          })
    },
    filterSearch() {
      var canGet = false
      var highSite = false
      var hot = false
      for (let i = 0; i < this.quickFilter.length; i++) {
        if (this.quickFilter[i] == '热门论文') {
          hot = true
        } else if (this.quickFilter[i] == '高被引论文') {
          highSite = true
        } else if (this.quickFilter[i] == '开放获取') {
          canGet = true
        }
      }
      if (this.condition) {
        const Parameters = {
          condition: this.conditionStore,
          paperFilter: {
            canGet: canGet,
            highSite: highSite,
            hot: hot,
          },
          sort: 1,
          year: {
            l: 1950,
            r: 2021,
          }
        }
        console.log('快速过滤')
        console.log(this.quickFilter)
        console.log(Parameters)
        axios({
          method: 'post',
          url: '/api/paper/search-theme/',
          data: Parameters
        }).then(response => {
          if (response.data.code == 200) {
            this.Papers = response.data.data.jsonArray
            this.relatedScholars = response.data.data.relaAuthor
            this.totalNum = response.data.data.total
            this.totalNum /= 2
            this.quickFilterStore = this.quickFilter
            this.sortButton = 1,
                this.inOrder1 = true
            this.inOrder2 = true
            this.inOrder3 = true
          } else {
            console.log(response.msg)
            this.quickFilter = this.quickFilterStore
            this.$message({
              message: '抱歉，没有符合条件的学术成果',
              type: 'warning'
            })
          }
        })
      } else if (this.conditions) {
        const Parameters = {
          conditions: this.conditionsStore,
          paperFilter: {
            canGet: canGet,
            highSite: highSite,
            hot: hot,
          },
          sort: 1,
          year: {
            l: 1950,
            r: 2021,
          }
        }
        axios({
          method: 'post',
          url: '/api/paper/multi-search/',
          data: Parameters
        }).then(response => {
          if (response.data.code == 200) {
            this.Papers = response.data.data.jsonArray
            this.relatedScholars = response.data.data.relaAuthor
            this.totalNum = response.data.data.total
            this.totalNum /= 2
            this.quickFilterStore = this.quickFilter
            this.sortButton = 1,
                this.inOrder1 = true
            this.inOrder2 = true
            this.inOrder3 = true
          } else {
            console.log(response.msg)
            this.quickFilter = this.quickFilterStore
            this.$message({
              message: '抱歉，没搜到符合的学术成果，请更换检索条件',
              type: 'warning'
            })
          }
        })
      }
    },
    filterField(value) {
      console.log('filterField:'+value)
      if(!value){
        this.clearFilterField()
        return
      }
      var canGet = false
      var highSite = false
      var hot = false
      var field = ''
      for (let i = 0; i < this.quickFilter.length; i++) {
        if (this.quickFilter[i] == '热门论文') {
          hot = true
        } else if (this.quickFilter[i] == '高被引论文') {
          highSite = true
        } else if (this.quickFilter[i] == '开放获取') {
          canGet = true
        }
      }
      console.log('field_filter')
      console.log(this.field_filter)
      console.log('field_filterStore')
      console.log(this.field_filterStore)
      for (let i = 0; i < this.conditions.length; i++) {
        if (this.conditions[i].key == 'field.keyword' && this.conditions[i].value == this.field_filterStore) {
          console.log('要删除')
          console.log(this.conditions[i])
          this.conditions.splice(i, 1)
          break
        }
      }
      if (this.condition) {
        this.conditions.push({
          key: 'title',
          option: this.condition.option,
          page: this.currentPage,
          size: 20,
          value: this.condition.value,
        })
      }
      if(this.field_filter) {
        if (this.field_filter.length == 2) {
          field = this.field_filter[1]
        } else {
          field = this.field_filter[0]
        }
        this.conditions.push({
          key: 'field.keyword',
          option: 0,
          page: 1,
          size: 20,
          value: field,
        })
      }
      const Parameters = {
        conditions: this.conditions,
        paperFilter: {
          canGet: canGet,
          highSite: highSite,
          hot: hot,
        },
        sort: 1,
        year: {
          l: this.leftYear,
          r: this.rightYear,
        }
      }
      console.log('领域过滤参数')
      console.log(Parameters)
      axios({
        method: 'post',
        url: '/api/paper/multi-search/',
        data: Parameters
      }).then(response => {
        if (response.data.code == 200) {
          this.Papers = response.data.data.jsonArray
          this.relatedScholars = response.data.data.relaAuthor
          this.totalNum = response.data.data.total
          this.totalNum /= 2
          this.condition = ''
          this.conditionStore = this.condition
          this.conditionsStore = this.conditions
          this.quickFilterStore = this.quickFilter
          this.sortButton = 1,
              this.inOrder1 = true
          this.inOrder2 = true
          this.inOrder3 = true
          this.field_filterStore = field
        } else {
          console.log(response.msg)
          for (let i = 0; i < this.conditions.length; i++) {
            if (this.conditions[i].key == 'field.keyword' && this.conditions[i].value == field) {
              console.log('要删除')
              console.log(this.conditions[i])
              this.conditions.splice(i, 1)
              break
            }
          }
          this.condition = this.conditionStore
          this.conditions = this.conditionsStore
          this.field_filter = this.field_filterStore
          this.$message({
            message: '抱歉，没搜到符合的学术成果，请更换检索条件',
            type: 'warning'
          })
        }
      })
    },
    clearFilterField() {
      console.log('clearing!')
      var canGet = false
      var highSite = false
      var hot = false
      for (let i = 0; i < this.quickFilter.length; i++) {
        if (this.quickFilter[i] == '热门论文') {
          hot = true
        } else if (this.quickFilter[i] == '高被引论文') {
          highSite = true
        } else if (this.quickFilter[i] == '开放获取') {
          canGet = true
        }
      }
      console.log('conditions')
      console.log(this.conditions)
      for (let i = 0; i < this.conditions.length; i++) {
        if (this.conditions[i].key == 'field.keyword' && this.conditions[i].value == this.field_filterStore) {
          console.log('要删除111111')
          console.log(this.conditions[i])
          this.conditions.splice(i, 1)
          break
        }
      }
      console.log('conditions')
      console.log(this.conditions)
      const Parameters = {
        conditions: this.conditions,
        paperFilter: {
          canGet: canGet,
          highSite: highSite,
          hot: hot,
        },
        sort: 1,
        year: {
          l: this.leftYear,
          r: this.rightYear,
        }
      }
      console.log('领域过滤参数')
      console.log(Parameters)
      axios({
        method: 'post',
        url: '/api/paper/multi-search/',
        data: Parameters
      }).then(response => {
        if (response.data.code == 200) {
          this.Papers = response.data.data.jsonArray
          this.relatedScholars = response.data.data.relaAuthor
          this.totalNum = response.data.data.total
          this.totalNum /= 2
          this.condition = ''
          this.conditionStore = this.condition
          this.conditionsStore = this.conditions
          this.quickFilter = []
          this.quickFilterStore = this.quickFilter
          this.sortButton = 1,
          this.inOrder1 = true
          this.inOrder2 = true
          this.inOrder3 = true
          this.field_filterStore = ''
        } else {
          console.log(response.msg)
          this.condition = this.conditionStore
          this.conditions = this.conditionsStore
          this.field_filter = this.field_filterStore
          this.$message({
            message: '抱歉，没搜到符合的学术成果，请更换检索条件',
            type: 'warning'
          })
        }
      })
    },
    showPaperDetail(id) {
      sessionStorage.setItem('paperId', id)
      // var queryParams
      // queryParams={id:id,paperId:id};
      // sessionStorage.setItem('queryParam',JSON.stringify(queryParams))
      router.push(
      {
        path: '/paperDetail',
        name: 'PaperDetail',
      })
    },
    follow(id) {
      this.$router.push({path:'/paperDetail',query:{paperId:id}});
    },
  },
}
</script>

<style scoped>
body {

}
</style>
